﻿@{
    ViewBag.Title = "Changuito";
}

<style type="text/css">
table thead.miNombre 
{
	font:15px arial;
	background-color: black;
	color: yellow;
}

td 
{
	border: 1px solid grey;
    background-color: red;
    color: white;
}


</style>

<h1>Changuito</h1>
<p><a href="@Url.Action("Home")">Home</a></p>
<p><a href="@Url.Action("ABM")">ABM</a></p>
<h2>Lista actual</h2>
<p><a href="@Url.Action("MostrarChanguito")">Ticket</a></p>
<table  >
    <thead class="miNombre">
    <tr>
      <th>Nombre</th>
      <th>Categoria</th>
      <th>Precio</th>
      <th>Cantidad</th>
    </tr>
    </thead>

    <tbody>
            
@{
    int co = 0;
    foreach (var i in Model)
    {
      <tr>
        <td>@i.nombre</td>
        <td>@i.categoria</td>
        <td>@i.precio</td>
        <td>
            <form action="/Electro/ChanguitoAgregar" method="post">
                <input type="hidden" name="pos" value="@co" />
                <input type="text" name="cantidad" value="@i.cantidad" size="5" />
                <input type="submit" value="Agregar" />
            </form>
        </td>
      </tr>
        co++;
    }
}
    </tbody>
  </table>
